package com.bookManagerment.mapper;

import com.bookManagerment.entity.Books;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.awt.print.Book;
import java.util.List;

@Repository
public interface BookMapper extends Mapper<Books> {

    List<Books> queryBooks(@Param("book") Books book,@Param("status") Boolean status);

    @Select("select * from books where number= #{number}")
    Books findBooks(@Param("number") String number);

    @Update("update books set total = #{total} where number = #{number} ")
    int updateBooks(@Param("number") String number,@Param("total") Integer total);

}
